home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
misc
/
emu
/
ASpEmu_NOROM.lha
/
ASpV076
/
Rexx
/
LoadSCR.asprx
next >
Wrap
Text File
|
2000-10-20
|
1KB
|
42 lines
/* $VER: LoadSCR 1.1 */
/* Load a .SCR file into the ASp display RAM */
/* Warning: Original data overwritten. */
/* Running program may trash image */
OPTIONS RESULTS
GETVERSION /* ask which ASp version is running */
IF result<760 THEN DO /* minimum of V0.76 to use this script */
ADDRESS COMMAND 'requestchoice >nil: TITLE "ASp ARexx Error" BODY "Requires ASp V0.76 or newer!" GADGETS "OK"'
EXIT
END
/* A messy File Requester using the DOS C:RequestFile command.. */
ADDRESS COMMAND "RequestFile >T:ASpRequest PATTERN=#?.SCR"
OPEN(TMPFILE,'T:ASpRequest',R)
filename=STRIP(READLN(TMPFILE),B,'"')
CLOSE(TMPFILE)
IF OPEN(SCRFILE,filename,READ) THEN DO /* open the file */
IF SEEK(SCRFILE,0,END)==6912 THEN DO /* check file length */
SEEK(SCRFILE,0,BEGIN)
filedata=READCH(SCRFILE,6912) /* read it */
GETPAGE /* which screen? */
p=RESULT
IF BITTST(D2C(p),3) THEN DO /* bit 3= scr buf */
SETPAGE 7 /* force shadow page in */
WRITERAM 49152 filedata /* write pic */
SETPAGE p /* put paging back */
END
ELSE DO
WRITERAM 16384 filedata /*write pic in normal display */
END
END
CLOSE(SCRFILE) /* tidy up behind us.. */
END